import request from '@/utils/request'

// 查询订单列表
export function listOrder(query) {
  return request({
    url: '/order/list',
    method: 'get',
    params: query
  })
}

// 查询订单详细
export function getOrder(orderId) {
  return request({
    url: '/order/' + orderId,
    method: 'get'
  })
}

// 取消订单
export function cancelOrder(orderId) {
  return request({
    url: '/order/cancel/' + orderId,
    method: 'put'
  })
}

// 删除订单
export function delOrder(orderId) {
  return request({
    url: '/order/' + orderId,
    method: 'delete'
  })
}